package com.tovast.demo.service.impl;

import com.tovast.demo.dao.UserDao;
import com.tovast.demo.domain.User;
import com.tovast.demo.service.SecurityMangeService;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * Created by zjp on 2016/9/24.
 */

public class SecurityMangeServiceImpl implements SecurityMangeService {
  @Autowired
  private UserDao userDao;


    @Override
    public User registe(User user) {

    String pwd=    user.getPassword();
        user.setPassword("fdf");
        return userDao.save(user);
    }

    @Override
    public User destroy(User user) {
         userDao.delete(user);
        return user;
    }
}
